- Sorting

arr: 

1	5	2	10

- Selection sort

Application#1: SortingApp.java

1	2	5	10

Simpler version of the problem: Try to let the smallest value occupy the first position in 
the array

for(int idx = 0; idx < arr.length - 1; idx++) {
int idxMin = idx;

for(int scan = idx + 1; scan < arr.length; scan++) {
	if(arr[scan] < arr[idxMin]) {
		idxMin = scan;
	}
}

swap(arr, idx, idxMin);
}

Time complexity: O(n^2)

- Insertion sort

10	5	1	2

5	10	1	2

1	5	10	2

1	2	5	10

Simpler version of the problem: Insert the first value into the sorted subset

for(int idx = 1; idx < arr.length; idx++) {
int insert = idx;

while(insert > 0 && arr[insert] < arr[insert - 1]) {
	swap(arr, insert, insert - 1);
	insert--;
}

}

- Application#2: BubbleSort.java

- Application#3: Anagram.java (LeetCode)

- Application#4: TwoSum.java


1	3	4	9		target: 7
	left	right


















